#ifndef ANALYSISSETTINGS_H
#define ANALYSISSETTINGS_H

#include <QComboBox>
#include <QPushButton>
#include <QHBoxLayout>
#include <QButtonGroup>
#include <QVBoxLayout>
#include <QLabel>
#include <QDialog>
#include <QFrame>
#include <QLineEdit>
#include <QRadioButton>

#include "pcrState.h"

// 分析配置弹窗
class DialogAnalysisSettings : public QDialog
{
    Q_OBJECT

public:
    explicit DialogAnalysisSettings(QWidget *parent = nullptr);

    void init(PCRState* state);
    void showEvent(QShowEvent *e) override;

public slots:
    void on_checkChanged();
    void on_yesClicked();
    void on_noClicked();

    void on_channelChanged();

public:

    QComboBox*      _combox_func;
    QComboBox*      _combox_filter;
    QComboBox*      _combox_ct;
    QComboBox*      _combox_thr;

    QVBoxLayout*    _layout;
    QHBoxLayout*    _layout_isFilter;
    QHBoxLayout*    _layout_filter;
    QHBoxLayout*    _layout_func;
    QHBoxLayout*    _layout_thr;
    QHBoxLayout*    _layout_ct;
    QHBoxLayout*    _layout_baseline;      // 起止循环数
    QHBoxLayout*    _layout_range;      // 起止循环数
    QHBoxLayout*    _layout_button;

    QButtonGroup    _buttonGroup_baseline;
    QRadioButton*   _button_baselineAuto;
    QRadioButton*   _button_baselineManual;

    QButtonGroup    _buttonGroup_filter;
    QRadioButton*   _button_filterOn;
    QRadioButton*   _button_filterOff;

    QPushButton*    _button_yes;
    QPushButton*    _button_no;

    QComboBox*      _combox_channel;
    QLineEdit*      _lineedit_start;
    QLineEdit*      _lineedit_end;



public:

    PCRState*       pState = nullptr;
    int             _reanalysis;
    int             _func;
    int             _filter;
    int             _ct;

};

#endif // ANALYSISSETTINGS_H
